NestedScrollingChildHelper

Helper class for implementing nested scrolling child views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21).

View subclasses should instantiate a final instance of this class as a field at construction. For each View method that has a matching method signature in this class, delegate the operation to the helper instance in an overridden method implementation. This implements the standard framework policy for nested scrolling.

Views invoking nested scrolling functionality should always do so from the relevant androidx.core.view.ViewCompat, androidx.core.view.ViewGroupCompat or androidx.core.view.ViewParentCompat compatibility shim static methods. This ensures interoperability with nested scrolling views on Android 5.0 Lollipop and newer.

Constructors

Link copied to clipboard
constructor(@NonNull view: View)
Construct a new helper for a given view.

Functions

Link copied to clipboard
open fun dispatchNestedFling(velocityX: Float, velocityY: Float, consumed: Boolean): Boolean
Dispatch a nested fling operation to the current nested scrolling parent.
Link copied to clipboard
open fun dispatchNestedPreFling(velocityX: Float, velocityY: Float): Boolean
Dispatch a nested pre-fling operation to the current nested scrolling parent.
Link copied to clipboard
open fun dispatchNestedPreScroll(dx: Int, dy: Int, @Nullable consumed: Array<Int>, @Nullable offsetInWindow: Array<Int>): Boolean
open fun dispatchNestedPreScroll(dx: Int, dy: Int, @Nullable consumed: Array<Int>, @Nullable offsetInWindow: Array<Int>, type: Int): Boolean
Dispatch one step of a nested pre-scrolling operation to the current nested scrolling parent.
Link copied to clipboard
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: Array<Int>): Boolean
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: Array<Int>, type: Int): Boolean
open fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: Array<Int>, type: Int, @Nullable consumed: Array<Int>)
Dispatch one step of a nested scrolling operation to the current nested scrolling parent.
Link copied to clipboard
Check if this view has a nested scrolling parent view currently receiving events for a nested scroll in progress with the type of touch.
Check if this view has a nested scrolling parent view currently receiving events for a nested scroll in progress with the given type.
Link copied to clipboard
Check if nested scrolling is enabled for this view.
Link copied to clipboard
View subclasses should always call this method on their NestedScrollingChildHelper when detached from a window.
Link copied to clipboard
open fun onStopNestedScroll(@NonNull child: View)
Called when a nested scrolling child stops its current nested scroll operation.
Link copied to clipboard
open fun seslDispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: Array<Int>, type: Int, @Nullable consumed: Array<Int>): Boolean
Dispatch one step of a nested scrolling operation to the current nested scrolling parent.
Link copied to clipboard
Enable nested scrolling.
Link copied to clipboard
open fun startNestedScroll(axes: Int): Boolean
open fun startNestedScroll(axes: Int, type: Int): Boolean
Start a new nested scroll for this view.
Link copied to clipboard
open fun stopNestedScroll()
open fun stopNestedScroll(type: Int)
Stop a nested scroll in progress.